
def fact(n):
    if n==1 or n==2:
        return 1
    else:
        return fact(n-1)+fact(n-2)
n=eval(input("请输入一个正整数："))
print("{}的斐波那契数列第n项是：{}".format(n,fact(n)))
def fact(n):
    sum=0
    for i in range(1,n+1):
        s=fact(i)
        sum += s
    return sum
print("{}的斐波那契数列前n项和是：{}".format(n,fact(n)))
